{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# SVM -- Renting Listing Inquries"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# import 必要的模块\n",
    "import pandas as pd \n",
    "import numpy as np\n",
    "\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "# 用正确率作为模型预测性能的评估\n",
    "from sklearn.metrics import accuracy_score\n",
    "\n",
    "from matplotlib import pyplot\n",
    "import seaborn as sns\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据探索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bathrooms</th>\n",
       "      <th>bedrooms</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>price</th>\n",
       "      <th>price_bathrooms</th>\n",
       "      <th>price_bedrooms</th>\n",
       "      <th>room_diff</th>\n",
       "      <th>room_num</th>\n",
       "      <th>Year</th>\n",
       "      <th>...</th>\n",
       "      <th>walk</th>\n",
       "      <th>walls</th>\n",
       "      <th>war</th>\n",
       "      <th>washer</th>\n",
       "      <th>water</th>\n",
       "      <th>wheelchair</th>\n",
       "      <th>wifi</th>\n",
       "      <th>windows</th>\n",
       "      <th>work</th>\n",
       "      <th>interest_level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.5</td>\n",
       "      <td>3</td>\n",
       "      <td>40.7145</td>\n",
       "      <td>-73.9425</td>\n",
       "      <td>3000</td>\n",
       "      <td>1200.0</td>\n",
       "      <td>750.000000</td>\n",
       "      <td>-1.5</td>\n",
       "      <td>4.5</td>\n",
       "      <td>2016</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2</td>\n",
       "      <td>40.7947</td>\n",
       "      <td>-73.9667</td>\n",
       "      <td>5465</td>\n",
       "      <td>2732.5</td>\n",
       "      <td>1821.666667</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2016</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>40.7388</td>\n",
       "      <td>-74.0018</td>\n",
       "      <td>2850</td>\n",
       "      <td>1425.0</td>\n",
       "      <td>1425.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2016</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>40.7539</td>\n",
       "      <td>-73.9677</td>\n",
       "      <td>3275</td>\n",
       "      <td>1637.5</td>\n",
       "      <td>1637.500000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2016</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1.0</td>\n",
       "      <td>4</td>\n",
       "      <td>40.8241</td>\n",
       "      <td>-73.9493</td>\n",
       "      <td>3350</td>\n",
       "      <td>1675.0</td>\n",
       "      <td>670.000000</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>5.0</td>\n",
       "      <td>2016</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 225 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   bathrooms  bedrooms  latitude  longitude  price  price_bathrooms  \\\n",
       "0        1.5         3   40.7145   -73.9425   3000           1200.0   \n",
       "1        1.0         2   40.7947   -73.9667   5465           2732.5   \n",
       "2        1.0         1   40.7388   -74.0018   2850           1425.0   \n",
       "3        1.0         1   40.7539   -73.9677   3275           1637.5   \n",
       "4        1.0         4   40.8241   -73.9493   3350           1675.0   \n",
       "\n",
       "   price_bedrooms  room_diff  room_num  Year       ...        walk  walls  \\\n",
       "0      750.000000       -1.5       4.5  2016       ...           0      0   \n",
       "1     1821.666667       -1.0       3.0  2016       ...           0      0   \n",
       "2     1425.000000        0.0       2.0  2016       ...           0      0   \n",
       "3     1637.500000        0.0       2.0  2016       ...           0      0   \n",
       "4      670.000000       -3.0       5.0  2016       ...           0      0   \n",
       "\n",
       "   war  washer  water  wheelchair  wifi  windows  work  interest_level  \n",
       "0    0       0      0           0     0        0     0               1  \n",
       "1    0       0      0           0     0        0     0               2  \n",
       "2    0       0      0           0     0        0     0               0  \n",
       "3    0       0      0           0     0        0     0               2  \n",
       "4    1       0      0           0     0        0     0               2  \n",
       "\n",
       "[5 rows x 225 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train = pd.read_csv('./AIData/RentListingInquries_FE_train.csv')\n",
    "test = pd.read_csv('./AIData/RentListingInquries_FE_test.csv')\n",
    "\n",
    "train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 49352 entries, 0 to 49351\n",
      "Columns: 225 entries, bathrooms to interest_level\n",
      "dtypes: float64(7), int64(218)\n",
      "memory usage: 84.7 MB\n"
     ]
    }
   ],
   "source": [
    "train.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bathrooms</th>\n",
       "      <th>bedrooms</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>price</th>\n",
       "      <th>price_bathrooms</th>\n",
       "      <th>price_bedrooms</th>\n",
       "      <th>room_diff</th>\n",
       "      <th>room_num</th>\n",
       "      <th>Year</th>\n",
       "      <th>...</th>\n",
       "      <th>walk</th>\n",
       "      <th>walls</th>\n",
       "      <th>war</th>\n",
       "      <th>washer</th>\n",
       "      <th>water</th>\n",
       "      <th>wheelchair</th>\n",
       "      <th>wifi</th>\n",
       "      <th>windows</th>\n",
       "      <th>work</th>\n",
       "      <th>interest_level</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>49352.00000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>4.935200e+04</td>\n",
       "      <td>4.935200e+04</td>\n",
       "      <td>4.935200e+04</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.0</td>\n",
       "      <td>...</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "      <td>49352.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>1.21218</td>\n",
       "      <td>1.541640</td>\n",
       "      <td>40.741545</td>\n",
       "      <td>-73.955716</td>\n",
       "      <td>3.830174e+03</td>\n",
       "      <td>1.697863e+03</td>\n",
       "      <td>1.657567e+03</td>\n",
       "      <td>-0.329460</td>\n",
       "      <td>2.753820</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.003080</td>\n",
       "      <td>0.000385</td>\n",
       "      <td>0.186477</td>\n",
       "      <td>0.009361</td>\n",
       "      <td>0.000446</td>\n",
       "      <td>0.028165</td>\n",
       "      <td>0.002026</td>\n",
       "      <td>0.001013</td>\n",
       "      <td>0.000952</td>\n",
       "      <td>1.616895</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>0.50142</td>\n",
       "      <td>1.115018</td>\n",
       "      <td>0.638535</td>\n",
       "      <td>1.177912</td>\n",
       "      <td>2.206687e+04</td>\n",
       "      <td>1.100477e+04</td>\n",
       "      <td>7.817996e+03</td>\n",
       "      <td>0.947732</td>\n",
       "      <td>1.446091</td>\n",
       "      <td>0.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.055412</td>\n",
       "      <td>0.019618</td>\n",
       "      <td>0.389495</td>\n",
       "      <td>0.101625</td>\n",
       "      <td>0.021109</td>\n",
       "      <td>0.165446</td>\n",
       "      <td>0.044969</td>\n",
       "      <td>0.031814</td>\n",
       "      <td>0.030846</td>\n",
       "      <td>0.626035</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-118.271000</td>\n",
       "      <td>4.300000e+01</td>\n",
       "      <td>2.150000e+01</td>\n",
       "      <td>4.300000e+01</td>\n",
       "      <td>-5.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1.00000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>40.728300</td>\n",
       "      <td>-73.991700</td>\n",
       "      <td>2.500000e+03</td>\n",
       "      <td>1.225000e+03</td>\n",
       "      <td>1.066667e+03</td>\n",
       "      <td>-1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>1.00000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>40.751800</td>\n",
       "      <td>-73.977900</td>\n",
       "      <td>3.150000e+03</td>\n",
       "      <td>1.500000e+03</td>\n",
       "      <td>1.383417e+03</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>1.00000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>40.774300</td>\n",
       "      <td>-73.954800</td>\n",
       "      <td>4.100000e+03</td>\n",
       "      <td>1.850000e+03</td>\n",
       "      <td>1.962500e+03</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>...</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>10.00000</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>44.883500</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>4.490000e+06</td>\n",
       "      <td>2.245000e+06</td>\n",
       "      <td>1.496667e+06</td>\n",
       "      <td>8.000000</td>\n",
       "      <td>13.500000</td>\n",
       "      <td>2016.0</td>\n",
       "      <td>...</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8 rows × 225 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         bathrooms      bedrooms      latitude     longitude         price  \\\n",
       "count  49352.00000  49352.000000  49352.000000  49352.000000  4.935200e+04   \n",
       "mean       1.21218      1.541640     40.741545    -73.955716  3.830174e+03   \n",
       "std        0.50142      1.115018      0.638535      1.177912  2.206687e+04   \n",
       "min        0.00000      0.000000      0.000000   -118.271000  4.300000e+01   \n",
       "25%        1.00000      1.000000     40.728300    -73.991700  2.500000e+03   \n",
       "50%        1.00000      1.000000     40.751800    -73.977900  3.150000e+03   \n",
       "75%        1.00000      2.000000     40.774300    -73.954800  4.100000e+03   \n",
       "max       10.00000      8.000000     44.883500      0.000000  4.490000e+06   \n",
       "\n",
       "       price_bathrooms  price_bedrooms     room_diff      room_num     Year  \\\n",
       "count     4.935200e+04    4.935200e+04  49352.000000  49352.000000  49352.0   \n",
       "mean      1.697863e+03    1.657567e+03     -0.329460      2.753820   2016.0   \n",
       "std       1.100477e+04    7.817996e+03      0.947732      1.446091      0.0   \n",
       "min       2.150000e+01    4.300000e+01     -5.000000      0.000000   2016.0   \n",
       "25%       1.225000e+03    1.066667e+03     -1.000000      2.000000   2016.0   \n",
       "50%       1.500000e+03    1.383417e+03      0.000000      2.000000   2016.0   \n",
       "75%       1.850000e+03    1.962500e+03      0.000000      4.000000   2016.0   \n",
       "max       2.245000e+06    1.496667e+06      8.000000     13.500000   2016.0   \n",
       "\n",
       "            ...                walk         walls           war        washer  \\\n",
       "count       ...        49352.000000  49352.000000  49352.000000  49352.000000   \n",
       "mean        ...            0.003080      0.000385      0.186477      0.009361   \n",
       "std         ...            0.055412      0.019618      0.389495      0.101625   \n",
       "min         ...            0.000000      0.000000      0.000000      0.000000   \n",
       "25%         ...            0.000000      0.000000      0.000000      0.000000   \n",
       "50%         ...            0.000000      0.000000      0.000000      0.000000   \n",
       "75%         ...            0.000000      0.000000      0.000000      0.000000   \n",
       "max         ...            1.000000      1.000000      1.000000      2.000000   \n",
       "\n",
       "              water    wheelchair          wifi       windows          work  \\\n",
       "count  49352.000000  49352.000000  49352.000000  49352.000000  49352.000000   \n",
       "mean       0.000446      0.028165      0.002026      0.001013      0.000952   \n",
       "std        0.021109      0.165446      0.044969      0.031814      0.030846   \n",
       "min        0.000000      0.000000      0.000000      0.000000      0.000000   \n",
       "25%        0.000000      0.000000      0.000000      0.000000      0.000000   \n",
       "50%        0.000000      0.000000      0.000000      0.000000      0.000000   \n",
       "75%        0.000000      0.000000      0.000000      0.000000      0.000000   \n",
       "max        1.000000      1.000000      1.000000      1.000000      1.000000   \n",
       "\n",
       "       interest_level  \n",
       "count    49352.000000  \n",
       "mean         1.616895  \n",
       "std          0.626035  \n",
       "min          0.000000  \n",
       "25%          1.000000  \n",
       "50%          2.000000  \n",
       "75%          2.000000  \n",
       "max          2.000000  \n",
       "\n",
       "[8 rows x 225 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train.describe()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据预处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/hankaei/anaconda3/envs/py27/lib/python2.7/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.\n",
      "  \"This module will be removed in 0.20.\", DeprecationWarning)\n"
     ]
    }
   ],
   "source": [
    "#数据标准化\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "from sklearn.cross_validation import train_test_split\n",
    "\n",
    "\n",
    "\n",
    "y_train = train['interest_level']\n",
    "X_train = train.drop(['interest_level'], axis = 1)\n",
    "\n",
    "X_train_part, X_val, y_train_part, y_val = train_test_split(X_train, y_train, train_size = 0.2, random_state = 0)\n",
    "#print len(X_train_part), len(y_train_part), len(X_test)\n",
    "X_test = test\n",
    "\n",
    "ss_X = StandardScaler()\n",
    "X_train = ss_X.fit_transform(X_train)\n",
    "X_test = ss_X.fit_transform(X_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 模型训练\n",
    "### default SVC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.svm import LinearSVC\n",
    "\n",
    "SVC1 = LinearSVC().fit(X_train_part, y_train_part)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Classification report for classifier LinearSVC(C=1.0, class_weight=None, dual=True, fit_intercept=True,\n",
      "     intercept_scaling=1, loss='squared_hinge', max_iter=1000,\n",
      "     multi_class='ovr', penalty='l2', random_state=None, tol=0.0001,\n",
      "     verbose=0):\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "          0       0.00      0.00      0.00      3079\n",
      "          1       0.25      0.97      0.39      8980\n",
      "          2       0.91      0.14      0.24     27423\n",
      "\n",
      "avg / total       0.69      0.32      0.26     39482\n",
      "\n",
      "\n",
      "Confusion matrix:\n",
      "[[    0  3022    57]\n",
      " [    0  8676   304]\n",
      " [    0 23547  3876]]\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/hankaei/anaconda3/envs/py27/lib/python2.7/site-packages/sklearn/metrics/classification.py:1135: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples.\n",
      "  'precision', 'predicted', average, warn_for)\n"
     ]
    }
   ],
   "source": [
    "from sklearn import metrics\n",
    "y_predict = SVC1.predict(X_val)\n",
    "\n",
    "print(\"Classification report for classifier %s:\\n%s\\n\"\n",
    "      % (SVC1, metrics.classification_report(y_val, y_predict)))\n",
    "print(\"Confusion matrix:\\n%s\" % metrics.confusion_matrix(y_val, y_predict))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 正则参数调优"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def fit_grid_point_Linear(C, X_train, y_train, X_val, y_val):\n",
    "    svc2 = LinearSVC(C = C)\n",
    "    svc2 = svc2.fit(X_train, y_train)\n",
    "    accuracy = svc2.score(X_val, y_val)\n",
    "    \n",
    "    print('accuracy: {}'.format(accuracy))\n",
    "    return accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy: 0.694569677321\n",
      "accuracy: 0.669191023758\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEKCAYAAAA4t9PUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACx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TyM2CWgvaWNJLYCDgQdzrqlRywaobwJmRcRv866nNiS1\nWTIjU9KqwK4U8feWZ20VQNIoYFPSLKG3gBMj4p18q6oZSXOAlsCCbNOEhjgDTdJ+wO+ANsCHwJSI\n2CPfqlaOpL2AK4GmwM0RMSznkmpE0j3ATqROs+8D50fETbkWVQOSfgg8D0wj/V0HODsiHs2vqpqR\n1A24jfT/VhPg/oi4sGg/z0FiZma14VtbZmZWKw4SMzOrFQeJmZnVioPEzMxqxUFiZma14iAxqwOS\nPq1+rxUeP1LSJtnXa0i6XtIbWefWcZK2ltQi+9oPEltJcZCY5UxSZ6BpRMzNNo0gNUFsHxGdgaOA\n1llzx6eAg3Ip1Gw5HCRmdUjJr7KeYNMkHZRtbyLp2uwK42FJj0o6MDvsUGBMtt/3ga2BcyPia4Cs\nQ/Aj2b4PZPublQxfIpvVrf2B7sDmpCe9J0kaB/QC2gFdgXVJLcpvzo7pBdyTfd2Z9JT+V8v5/OnA\nVkWp3KyGfEViVrd+CNyTdV59H3iO9Iv/h8AfIuLriPg78EyVY9YH5hfy4VnALMoWXjIrCQ4Ss7q1\nrPbwK9oO8C9glezrGcDmklb0d7Ml8EUNajMrCgeJWd0aBxyULSrUBtgBeJm01OkB2VjJd0hNDpeY\nBfwAICLeACqBX2TdaJHUfskaLJJaAfMj4sv6OiGz6jhIzOrWaOA1YCrwNPB/2a2sUaQ1SKaT1pmf\nCHyUHfMI/xssxwHrAXMkTQNu5L9rlfQGGlw3Witv7v5rVk8krRERn2ZXFS8DvSLi79l6Ec9k75c3\nyL7kM/4IDG3g69VbmfGsLbP683C22FAL4KLsSoWI+Jek80lrtv9teQdnC2A94BCxUuMrEjMzqxWP\nkZiZWa04SMzMrFYcJGZmVisOEjMzqxUHiZmZ1YqDxMzMauX/AStDUeTzhvsOAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x11087cf10>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "C_s = np.logspace(-3, 3, 2)\n",
    "\n",
    "accuracy_s = []\n",
    "for i, oneC in enumerate(C_s):\n",
    "    tmp = fit_grid_point_Linear(oneC, X_train, y_train, X_val, y_val)\n",
    "    accuracy_s.append(tmp)\n",
    "    \n",
    "x_axis = np.log10(C_s)\n",
    "pyplot.plot(x_axis, np.array(accuracy_s), 'b-')\n",
    "\n",
    "pyplot.legend()\n",
    "pyplot.xlabel('log(C)')\n",
    "pyplot.ylabel('accuracy')\n",
    "pyplot.savefig('SVM_RentingListingInquries.png')\n",
    "\n",
    "pyplot.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.svm import SVC\n",
    "\n",
    "# RBF核的SVM\n",
    "def fit_grid_point_RBF(C, gamma, X_train, y_train, X_val, y_val):\n",
    "    svc3 = SVC(C = C, kernel = 'rbf', gamma = gamma)\n",
    "    svc3 = svc3.fit(X_train, y_train)\n",
    "    \n",
    "    accuracy = svc3.score(X_val, y_val)\n",
    "    \n",
    "    print(\"accuracy: {}\".format(accuracy))\n",
    "    return accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy: 0.694569677321\n",
      "accuracy: 0.694569677321\n",
      "accuracy: 0.639835874576\n",
      "accuracy: 0.694670989312\n"
     ]
    }
   ],
   "source": [
    "# 需要调优的参数\n",
    "C_s = np.logspace(-1, 2, 2)\n",
    "gamma_s = np.logspace(-2, 2, 2)\n",
    "\n",
    "accuracy_s = []\n",
    "for i, oneC in enumerate(C_s):\n",
    "    for j, gamma in enumerate(gamma_s):\n",
    "        tmp = fit_grid_point_RBF(oneC, gamma, X_train_part, y_train_part, X_val, y_val)\n",
    "        accuracy_s.append(tmp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "i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fDSve24abI9Mt/Szo1KkT8+bN4+zZs0DKWT7H\njh0jNjYWYwwDBw7kjTfeYPv27QAUKVKES5cuAdC6devbB4N79Ojxt+UGBgbe3u+9e/duTp48Sc2a\nNWnbti3z5s0DICIi4m9b0DVr1ry9pd22bVsWL15MYmIily5dur2vHVKOC5QrV46kpCS+//77HHle\n4uPjKV++PCLC7Nmz//YmtG/fPho2bAjAnDlz2LFjx+3AX7ZsGcHBwSxevBgvL690l92yZUuioqI4\nevQoiYmJzJs3j969e6c7Vqn74V3Ek+mPNeGzx5tyNiGRPtM38N6KPVxLumF1adlCQz8LfH19ee21\n1+jUqRN+fn506dKF06dPEx0dTWBgIP7+/jz77LO88847ADz11FM888wzmR7IfeGFF7h69Sq+vr48\n9thjzJkzBw8PD1544QWOHz+On58fH330EQ0bNry966hnz5788ccfALRq1Ypu3brh5+fHgAEDaNas\n2e1xb775Js2bN6dz587Ur18/R56X0aNHM3PmTFq2bMnRo0f/9qlh7dq1GZ62OWrUKC5dukTHjh3x\n9/dn1KhRAERHR98Odnd3d6ZMmXK7/scff5w6derkyHoo59atYTnWjA9iQBMfPgs5SI/J6/jz8Dmr\ny8o6Y4xD/TRt2tSkFRUVdcc0Z5SUlGSuXr1qjDFm3759pmrVqiYpKckYY0x0dLTp2rXr7bGXLl0y\nxhiTkJBg/P39TXh4eO4XnMbNmzdNmzZtzIULF3Ll9+nfjcou6/fHmrbv/2aq/HOp+deCnebi1etW\nl3QHIMzYkbF5bp++M0tISKBjx44kJydjjOHzzz+/fYqjj48PTz75JAkJCRQuXJinn36avXv3cu3a\nNYYNG4afn5/F1cOZM2d48cUX7/nAtlJWa1OzNCvHBfLRqn3M2nCY33af4Z2HfOlQt4zVpd2zPNFw\nbffu3dSrV8+iilRepX83KidsP3aef/68k/1nEujrX4F/92pAyUL2f0kzp+SrhmtKKeUomlQuwdIx\nbRnbsRbLIk7SKTiExeEn8kwrBw19pZS6R55urozvXJslL7SlUokCjPnhL56dE8bJ+KtWl5YpDX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rbCIfCUiEbYGav1t0xNSLWuAiHxt\nu/21iASLyFrgfRFpLiIbReQv2791bONcReS/qZb7goh0FJEFqZbbWUTS+xq+UjlCt1JUfjbMGHNO\nRAoAW0VkESl9cgKNMYdFpKRt3P+R8jV3X0hpd2HHsmsDnYwxN0SkqG2ZySLSCXgH6A8MB6oBjW3z\nSgLngeki4m2MiQWeAr7KxnVW6q409FV+NkZEHrLdrkRKCIcaYw4DGGNuNXvrREp/HWzTz9ux7J+M\nMTdst4sBs0WkFilfr3dPtdzPTEob6du/T0S+AR4Xka+AVsAT97l+St0zDX2VL4lIe1JCt5Ux5oqt\nI2k4KVdZu2M46betTT3NK828y6luvwWsNcY8ZOuP/kcmy/2KlNbM10h580i+y6oola10n77Kr4oB\n522BX5eUS855AkEiUg1SrktsG7uKlIZd2Kbf2r1zWkTqiYgLKY397va7jttuP5lq+ipgxK2Dvbd+\nn0lpj30CeBX4+n5XUKn7oaGv8qtfATcR2UnKlvhmIJaUXTy/iEg48KNt7NtACRHZZZvewTb9JWAp\n8DspHR4z8gHwrohsIOX6urfMBI4BO23LfTTVvO+AaGOMo7TGVk5Cu2wqZQERmQb8ZYz50upalHPR\n0Fcql4nINlKOCXQ2xiRaXY9yLhr6SinlRHSfvlJKORENfaWUciIa+kop5UQ09JVSyolo6CullBPR\n0FdKKSfy/wEEIKaJOZIsmgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x117089690>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "accuracy_s1 = np.array(accuracy_s).reshape(len(C_s), len(gamma_s))\n",
    "x_axis = np.log10(C_s)\n",
    "for j, gamma in enumerate(gamma_s):\n",
    "    pyplot.plot(x_axis, np.array(accuracy_s1[:,j]), label='Test-log(gamma)'+str(np.log10(gamma)))\n",
    "\n",
    "pyplot.legend()\n",
    "pyplot.xlabel('log(C)')\n",
    "pyplot.xlabel('accuracy')\n",
    "pyplot.savefig('RBF_SVM_RentingListingInquries.png')\n",
    "\n",
    "pyplot.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "svc3 = SVC(C = 100, kernel = 'rbf', gamma = 100)\n",
    "svc3.fit(X_train, y_train)\n",
    "pred = svc3.predict(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "pred.to_csv('pred_svc.csv')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
